<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>修改密码</title>
	<link rel="stylesheet" type="text/css" href="<?=base_url()?>public/css/style.css">
	<script type="text/javascript" src="<?=base_url()?>public/js/jq.1.12.4.js"></script>
	<script type="text/javascript" src="<?=base_url()?>public/js/js.js"></script>
<style>
	.person p{overflow:visible;position:relative;}
	.person p span {width: 22% !important;}
	.person p input{box-shadow: -2px 0px 0px 0px rgba( 11, 2, 5, 0.2 );}
	.person p b{position:absolute;top: 11px; width: 150px;right: -72px;color:red;display:none;}
</style>
</head>
<body>
	<!-- 头部 -->
	<?php echo $menu ?>
	<!-- 主体 -->
	<div class="main clearfix">
		<?php echo $left ?>
		<div class="content">
			<div class="con">
				<div class="bikuang">
                	<div class="right_title">
                		<span>公益个人中心&nbsp;&nbsp; -</span>
                		<span style="color:#1d3e00; margin:0;">&nbsp;&nbsp;修改密码</span>
                	</div>
                    <div style="border-bottom:1px solid #c0cbb0; padding-bottom:20px; width:100%; margin:0 auto;box-shadow: -3px 3px 6px 0px rgba( 29, 62, 0, 0.2 );">      
						<?php echo form_open('editpassword/info_post',array('id'=>'pwdform')) ?>
						<div class="person">
	                    	<p><span>原登录密码</span>*<input id="old_pwd" name="old_pwd" type="password" value=""><b></b></p>
	                        <p><span>新登录密码</span>*<input id="pwd" name="pwd" type="password" value=""><b></b></p>
	                        <p><span>新登录密码确认</span>*<input id="again_pwd"  type="password" value=""><b></b></p>
	                        <input name="action" type="hidden" value="one">
	                        <p id="btn_pwd" class="btn"><input style="width:30%; background:#254e01; color:white; margin-left:40%; margin-top:40px; margin-left:40%;position:relative;" type="button" value="确认提交" class='bnt-js'></p>
	                    </div>
	                	</form>
                    </div>
                    <div class="right_title">
                    	<span>公益个人中心&nbsp;&nbsp; -</span>
                    	<span style="color:#1d3e00; margin:0;">&nbsp;&nbsp;修改二级密码</span>
                    </div>
                    <div class="person">
                    	<?php echo form_open('editpassword/info_post',array('id'=>'spwdform')) ?>
                    	<p><span>原二级密码</span>*<input id="old_spwd" name="old_spwd" type="password" value=""><b></b></p>
                        <p><span>新二级密码</span>*<input id="spwd" name="spwd" type="password" value=""><b></b></p>
                        <p><span>新二级密码确认</span>*<input id="again_spwd" type="password" value=""><b></b></p>
                        <input name="action" type="hidden" value="two">
                        <p id="btn_spwd" class="btn"><input style="width:30%; background:#254e01; color:white; margin-left:40%; margin-top:40px; margin-left:40%;" type="button" value="确认提交" class='bnt-js1'></p>
                        </form>
                    </div>
				</div>
			</div>
		</div>
	</div>
	<!-- <div style='position:fixed;width:18%;height:220px;background:rgba(133,220,75,0.7);color:white;top:36%;left:49%;text-align:center;line-height:220px;display:none;' class='js-tishi' >dwadwadaw</div> 
-->
</body>
</html>
<script type="text/javascript">
$('.bnt-js').on('mousedown',function(){
		$('.bnt-js').css('top','5px');
		console.log(1)
	})
	$('.bnt-js').on('mouseup',function(){
		$('.bnt-js').css('top','0px');
		console.log(2)
	})
	$('.bnt-js1').on('mousedown',function(){
		$('.bnt-js1').css('margin-top','45px');
		console.log(1)
	})
	$('.bnt-js1').on('mouseup',function(){
		$('.bnt-js1').css('margin-top','40px');
		console.log(2)
	})
//一级密码修改
// $('.js-tishi').on('click',function(){
// 		$('.js-tishi').css('display','none');
// 	})
$('#btn_pwd').on('click',  function(event) {
	if($('#old_pwd').val() == ''){
		$('#pwdform .person>p:first-child>b').css('display','block');
	   $('#pwdform .person>p:first-child>b').html('请输入原密码');
	   $('#old_pwd').css('border','1px solid red');
		//alert('请输入原密码');
		return false;
	}else{
		$('#pwdform .person>p:first-child>b').css('display','none');
		 $('#old_pwd').css('border','1px solid #d1d6bf');
	}
	if($('#pwd').val() == ''){
		$('#pwdform .person>p:nth-child(2)>b').css('display','block');
	  $('#pwdform .person>p:nth-child(2)>b').html('请输入新密码');
	  $('#pwd').css('border','1px solid red');
		//alert('请输入新密码');
		return false;
	}else{
		$('#pwd').css('border','1px solid #d1d6bf');
		$('#pwdform .person>p:nth-child(2)>b').css('display','none');
	}
	if($('#pwd').val() != $('#again_pwd').val()){
		$('#pwdform .person>p:nth-child(3)>b').css('display','block');
	   $('#pwdform .person>p:nth-child(3)>b').html('新密码两次输入不同');
	   $('#pwd').css('border','1px solid red');
		//alert('新密码两次输入不同');
		return false;
	}else{
		$('#pwdform .person>p:nth-child(3)>b').css('display','none');
		$('#pwd').css('border','1px solid #d1d6bf');
	}

	$('#pwdform').submit();
});
//二级密码修改
$('#btn_spwd').on('click',  function(event) {
	if($('#old_spwd').val() == ''){
		$('#spwdform>p:first-child>b').css('display','block');
	  $('#spwdform>p:first-child>b').text('请输入原密码');
	  $('#old_spwd').css('border','1px solid red');
		//alert('请输入原密码');
		$('#old_spwd').css('border','1px solid red');
		return false;
	}else{
		$('#spwdform>p:first-child>b').css('display','none');
		$('#old_spwd').css('border','1px solid #d1d6bf');
	}
	if($('#spwd').val() == ''){
		$('#spwdform>p:nth-child(2)>b').css('display','block');
	  $('#spwdform>p:nth-child(2)>b').text('请输入新密码');
	   $('#spwd').css('border','1px solid red');
	 
		//alert('请输入新密码');
		return false;
	}else{
		 $('#spwdform>p:nth-child(2)>b').css('display','none');
		 $('#spwd').css('border','1px solid #d1d6bf');
	}
	if($('#spwd').val() != $('#again_spwd').val()){
		$('#spwdform>p:nth-child(3)>b').css('display','block');
	   $('#spwdform>p:nth-child(3)>b').text('新密码两次输入不同');
	   $('#spwd').css('border','1px solid red');
		//alert('新密码两次输入不同');
		return false;
	}else{
		 $('#spwdform>p:nth-child(3)>b').css('display','none');
		  $('#spwd').css('border','1px solid #d1d6bf');
	}

	$('#spwdform').submit();
});
</script>
